package com.bit.BlogTest.Repository;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;

import com.bit.BlogTest.Model.Blog;

@Component
public class BlogRowMapper implements RowMapper<Blog>{

	public Blog mapRow(final ResultSet rs, final int rowNum) throws SQLException {
		return new Blog(rs.getString("title"), rs.getString("content"), rs.getString("writer"));
	}
	
}
